<template>
	<view>
		<view v-for="(item,index) in datalist" style="margin: 10rpx;">
		  <CustomTextView
		    :title="item.title"
		    :isTop="item.isTop"
		    :author="item.author"
		    :comments="item.comments"
		    :time="item.time"
		    @click="onCustomViewClick()">
		    <template v-slot:tips>
		      <view class="slotcontent" v-if="item.showSearch">
		        <text>搜索：</text>
		        <view class="borderbox"><text>今日金价</text></view>
		        <view class="borderbox"><text>双十一狂欢购</text></view>
		      </view>
		    </template>
		  </CustomTextView>
		</view>
	</view>
</template>

<script>
	import CustomTextView from "../../components/cardViewText.vue"
	export default {
		components:{
			CustomTextView
		},
		data() {
			return {
				datalist: [{
				  nID: "T15627",
				  title: "习近平同韩国总统李在明会谈",
				  isTop: true,
				  author: "界面新闻",
				  comments: 7758,
				  time: "2025.11.01"
				}, {
				  nID: "B4485",
				  title: "泰州点球大战胜南通 夺苏超冠军",
				  isTop: false,
				  author: "百度热搜",
				  comments: 11025,
				  time: "2025.11.2"
				},
				{
					nID: "B4485",
					title: "外交部回应日本人领导人涉台错误言行",
					isTop: false,
					author: "人民日报",
					comments: 7452,
					time: "2025.10.31",
					showSearch : true
				},
				{
					nID: "B4485",
					title: "电诈头目陈志仍下落不明！新加坡出手：冻结8.2亿元资产，查封扣押6处房产、1艘游艇、11辆豪车	",
					isTop: false,
					author: "红星新闻",
					comments: 1256,
					time: "2025.10.29"
				},{
					nID: "B4485",
					title: "中国接任APEC东道主 大国外交最前线|走！见证一场氛围感拉满的欢迎仪式",
					isTop: false,
					author: "中国日报网",
					comments: 1056,
					time: "2025.10.31"
				},
				{
					nID: "B4485",
					title: "第二届中信财富管理大会召开 共探财富管理行业转型路径与全球配置新机遇",
					isTop: false,
					author: "中新网",
					comments: 895,
					time: "2025.11.1"
				},
				{
					nID: "B4485",
					title: "11家公司推进并购 华虹公司Q1归母净利润同比下降89%｜科创板周报",
					isTop: false,
					author: "科创板日报",
					comments: 1175,
					time: "2025.11.2"
				},
				]
			}
		},
		methods: {
			
		}
	}
</script>

<style>
/* 搜索区域整体容器 */
.slotcontent {
  margin: 10rpx 0;
  display: flex;
  align-items: center;
  font-size: 28rpx; 
}

.slotcontent text{
  color: mediumpurple ;
  margin-right: 10rpx;

}

.borderbox {
  border: 1rpx solid gray;
  border-radius: 10rpx;
  margin: 0 8rpx;
  
}
</style>

